//  Copyright (C) 2014 Xiande (Triston) Cao

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#include "simulationoption.hpp"

using namespace cvsie;

// convert 1 unit length to meter
double GetScaleToMeterByLengthUnit(const LengthUnit &length_unit) {
  switch (length_unit) {
    case nm:
      return 1.0e-9;
    case um:
      return 1.0e-6;
    case mm:
      return 1.0e-3;
    case cm:
      return 1.0e-2;
    case km:
      return 1.0e3;
    case inch:
      return 0.0254;
    case foot:
      return 0.3048;
    default: //meter
      return 1.0;
  }
} 
